package com.neo.consumer;

import com.neo.config.ConfirmConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName: WarningConsumer
 * @Title: springboot-rabbitmq
 * @Package: com.neo.consumer
 * @Description: 报警消费者
 * @Author: Kisen
 * @Date: 2021/9/28 22:18
 */
@Slf4j
@Component
public class WarningConsumer {

    @RabbitListener(queues = ConfirmConfig.WARNING_QUEUE_NAME)
    public void receiveWarningMsg(Message message) {
        log.info("报警发现不可路由消息：{}", new String(message.getBody()));
    }
}
